#include "OrderServer.h"
#include <unistd.h>

#include "MemoryPool.h"
#include "OrderPacket.h"
#include <string.h>

using namespace std;
int main()
{
    const char *listen_ip = "0.0.0.0";
    uint16_t listen_port = 12345;
    const char *target_ip = "192.168.0.100"; // 交易所地址
    uint16_t target_port = 23456;

    OrderServer server(listen_ip, listen_port, target_ip, target_port, 0, 1);

    server.start();

    while (true)
    {
        sleep(10); // 挂着跑
    }

    server.stop();

    return 0;
}